<template>
  <item-add text="返回" url="/excellent"></item-add>
  <div class="utils-flex-Justcenter">
    <el-form :model="personFrom" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
      <el-form-item label="姓名" prop="name">
        <el-input v-model="personFrom.name"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import {inject, onMounted, reactive, toRefs, ref, unref} from "vue";
import ItemAdd from "../../../components/itemAdd.vue";

export default {
  name: "index",
  components: {ItemAdd},
  setup() {
    const data = reactive({
      personFrom: {
        name: "",
        password: "",
        action: "password"
      }
    })
    const rules = {
      name: [
        {required: true, message: "姓名不能为空", trigger: "blur"},
      ],
    }
    return {
      ...toRefs(data),
      rules
    }
  }
}
</script>

<style scoped lang="less">
.el-form {
  width: 60%;
}
</style>